﻿#region Licence
// <copyright file="Interfaces/IServiceLocalize.cs" company="Kopigi">
// Copyright © Kopigi 2014
// </copyright>
// ****************************************************************************
// <author>Marc PLESSIS</author>
// <date>10/10/2014</date>
// <project>Nentang.wpf</project>
// <web>http://nentang.codeplex.com</web>
// <license>
// The MIT License (MIT)
// 
// Copyright (c) 2013 Marc Plessis
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// 
// </license>
#endregion
namespace Interfaces
{
    /// <summary>
    /// Service de gestion de l'internationalisation
    /// </summary>
    public interface IServiceLocalize
    {
        /// <summary>
        /// Initialise les traductions des modules en base de données
        /// </summary>
        /// <returns>Indique si l'opération s'est correctement déroulée</returns>
        bool InitialLocalizedValues();

        /// <summary>
        /// Charge en mémoire les traductions
        /// </summary>
        /// <returns>Indique si l'opération s'est correctement déroulée</returns>
        bool LoadLocalizedValues();

        /// <summary>
        /// Recherche la valeur d'une ressource
        /// </summary>
        /// <param name="key">Clé de la ressource voulue</param>
        /// <param name="isUpperCase">Indique si la valeur doit être converti en majuscule ou laissée telle que</param>
        /// <returns>Valeur de la ressource</returns>
        string LocalizedFromKey(string key, bool isUpperCase = false);

        /// <summary>
        /// Recherche la valeur, internationalisée, d'un nom de colonne
        /// </summary>
        /// <param name="table">Table</param>
        /// <param name="column">Colonne</param>
        /// <param name="isUpperCase">Indique si la valeur doit être converti en majuscule ou laissée telle que<</param>
        /// <returns>Nom de la colonne</returns>
        /// <remarks>
        /// Afin d'internationaliser le nom de la colonne, la clé de la ressource doit être au format table.colonne
        /// </remarks>
        string LocalizedColumnTable(string table, string column, bool isUpperCase = false);

        /// <summary>
        /// Indique la culture utiliser lors de l'éxécution de l'application
        /// </summary>
        /// <param name="culture">Culture voulue</param>
        void SetCulture(string culture);
    }
}
